package com.hongyun.tms.common.dto.pordwork;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hongyun.tms.common.annotation.excel.ExcelInfo;
import com.hongyun.tms.infra.excel.converter.LocalDateTimeOrDateConverter;
import com.hongyun.tms.infra.excel.converter.enums.ProdPlanEnumConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 特殊作业记录 导出
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
@ExcelInfo(fileName = "特殊作业记录导出")
public class SpecialWorkExportDto implements Serializable {

    @ApiModelProperty(value = "拖轮编号")
    @ExcelProperty(value = "拖轮编号", index = 0)
    private String tugNo;

    @ApiModelProperty(value = "作业项目")
    @ExcelProperty(value = "作业项目", index = 1)
    private String workItemName;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty(value = "开始时间", converter = LocalDateTimeOrDateConverter.class, index = 2)
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ExcelProperty(value = "结束时间", converter = LocalDateTimeOrDateConverter.class, index = 3)
    private LocalDateTime endTime;

    @ApiModelProperty(value = "客户名称")
    @ExcelProperty(value = "客户名称", index = 4)
    private String customerName;

    @ApiModelProperty(value = "作业时长")
    @ExcelProperty(value = "作业时长", index = 5)
    private BigDecimal workHours;

    @ApiModelProperty(value = "备注")
    @ExcelProperty(value = "备注", index = 6)
    private String remark;

    @ApiModelProperty(value = "0未审核1已审核")
    @ExcelProperty(value = "状态", converter = ProdPlanEnumConverter.class, index = 7)
    private Integer status;
}
